a = {"one","two","three","four"}
for i,v in ipairs(a) do
	print(i,v)
end

function iter(a,i)
	i = i + 1
	local v = a[i]
	if v then
		return i,v
	end
end

function ipairs (a)
	return iter,a,0
end


for i,v in ipairs(a) do
	print(i,v)
end


for line in io.lines() do
	io.write(line,'\n')
end

